package com.bupt.liutong.admin.sch.form;

import org.apache.struts.upload.FormFile;

import com.bupt.liutong.admin.core.base.Photo;
import com.bupt.liutong.admin.core.base.PhotosForm;
import com.bupt.liutong.admin.core.form.ConfigForm;
import com.bupt.liutong.admin.sch.dto.IntroPhoto;

public class IntroForm extends ConfigForm implements PhotosForm {

	private static final long serialVersionUID = 3085866611529193081L;
	private String[] photoDeses = new String[20];
	private Integer[] photoIds = new Integer[20];
	private Integer[] photoSeqs = new Integer[20];

	private String[] newPhotoDeses = new String[5];
	private FormFile[] newPhotoFiles = new FormFile[5];

	public String[] getPhotoDeses() {
		return photoDeses;
	}

	public void setPhotoDeses(String[] photoDeses) {
		this.photoDeses = photoDeses;
	}

	public Integer[] getPhotoIds() {
		return photoIds;
	}

	public void setPhotoIds(Integer[] photoIds) {
		this.photoIds = photoIds;
	}

	public String[] getNewPhotoDeses() {
		return newPhotoDeses;
	}

	public void setNewPhotoDeses(String[] newPhotoDeses) {
		this.newPhotoDeses = newPhotoDeses;
	}

	public FormFile[] getNewPhotoFiles() {
		return newPhotoFiles;
	}

	public void setNewPhotoFiles(FormFile[] newPhotoFiles) {
		this.newPhotoFiles = newPhotoFiles;
	}

	
	public Photo getNewPhoto(int i) {
		IntroPhoto photo = new IntroPhoto();
		photo.setDes(this.newPhotoDeses[i]);
		photo.setFile(this.newPhotoFiles[i]);
		return photo;
	}

	
	public Photo getPhoto(int i) {
		IntroPhoto photo = new IntroPhoto(photoIds[i], photoDeses[i]);
		photo.setSeq(photoSeqs[i]);
		return photo;
	}

	
	public Integer[] getPhotoSeqs() {
		return photoSeqs;
	}

	
	public void setPhotoSeqs(Integer[] photoSeqs) {
		this.photoSeqs = photoSeqs;
	}
}
